home *** CD-ROM | disk | FTP | other *** search
/ Aminet 22 / Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso / Aminet / dev / c / focs.lha / focs.readme < prev   
Text File  |  1997-10-26  |  1KB  |  40 lines

  1. Short:    Creates C header files for SetFunction()
  2. Author:   andrea.vallinotto@torino.alpcom.it
  3. Uploader: andrea.vallinotto@torino.alpcom.it
  4. Type:     dev/c
  5. Version:  1.0
  6.  
  7. This is a little tool I made for all programmers who need to call SetFunction()
  8. from C (or C++). It is intended to make life easier and to make source files more
  9. readable.
  10.  
  11. Usually, when one want to use SetFunction(), he/she must look in .fd files or
  12. #pragma statements to find the LVO of each function he/she want to patch (*). This
  13. leads to source files difficult to understand and maintain, since each call to
  14. SetFunction() looks like:
  15.  
  16. oldfunction=SetFunction(Execbase,-690,myfunction);
  17.  
  18. where you can't understand very well which function is being patched, unless you
  19. add tons of comment lines to each call.
  20.  
  21. (*)= All the system libraries offsets exist through amiga.lib, but 3rd party
  22. libraries don't. This is why I made FOCS!
  23.  
  24. FOCS (that stands for Function Offset Creator for SetFunction() ), takes a file
  25. with LVOs and creates nice C header (.h) files, with a symbol definition for each
  26. function found in the LVO file.
  27. So the example above will look like:
  28.  
  29. oldfunction=SetFunction( Execbase, FOS_FreeVec, myfunction );
  30.  
  31. Nice, isn't it ?
  32.  
  33. FOCS version 1.0 support the following file formats:
  34.  - SAS C #pragma files
  35.  - StormC #pragma files (similar but not the same stuff).
  36.  - FD files (those who started it all).
  37.  - GCC inline's (hopefully... only the new, preprocessor based format is
  38.    supported). 
  39.  
  40.